<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:a4j="http://richfaces.org/a4j"
                xmlns:rich="http://richfaces.org/rich"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                template="/restrito/layout/template.xhtml"
                xmlns:c="http://java.sun.com/jsp/jstl/core">
    <ui:define name="content">
        <p>
            <ui:insert name="content">
            </ui:insert>
        </p>
        <h:form>
            <rich:panel>
                <f:facet name="header">
                    <h:panelGroup>
                        <h:outputText value="Finalizando vendas" />
                    </h:panelGroup>
                </f:facet>
                <h:panelGrid columns="1" border="1">
                    <h:outputText value=" Parabens  pela sua compra, o valor da mesma é:  #{vendaController.selectSale.valor}"/>
                    Qual a forma de pagamento desejada?
                    <h:selectOneRadio  value="#{vendaController.selectSale.formaDePagamento}" >
                        <f:selectItem  itemValue="cartaoDeCredito" itemLabel="Cartão de Crédito"/>
                        <f:selectItem itemValue="boleto" itemLabel=" Boleto Bancário"/>
                        <f:selectItem itemValue="aVista" itemLabel="A Vista" />
                    </h:selectOneRadio>
                </h:panelGrid>
                <br/>
                <h:commandButton value="Avançar" action="#{vendaController.beginSale}"/>
                <h:commandButton action="#{vendaController.listarVendas}" value=" Carrinho De Compra " />
            </rich:panel>
        </h:form>
        <br/>
        <h:messages style="font-size: 13px; color: white;"/>
    </ui:define>
</ui:composition>
